﻿using System;

namespace YJKExcelFormTool.Designer
{
	public class CellInfo
	{
		public int StartRowIndex { get; set; }

		public int EndRowIndex { get; set; }

		public int StartColIndex { get; set; }

		public int EndColIndex { get; set; }

		public string Text { get; set; }

		public CellInfo.CellInfoType InfoType { get; set; }

		public CellInfo()
		{
		}

		public CellInfo(CellInfo cellInfo)
		{
			this.StartRowIndex = cellInfo.StartRowIndex;
			this.EndRowIndex = cellInfo.EndRowIndex;
			this.StartColIndex = cellInfo.StartColIndex;
			this.EndColIndex = cellInfo.EndColIndex;
			this.Text = cellInfo.Text;
			this.InfoType = cellInfo.InfoType;
		}

		public CellInfo(int startRowIndex, int endRowIndex, int startColIndex, int endColIndex, string text, CellInfo.CellInfoType infoType = CellInfo.CellInfoType.CIT_Text)
		{
			this.StartRowIndex = startRowIndex;
			this.EndRowIndex = endRowIndex;
			this.StartColIndex = startColIndex;
			this.EndColIndex = endColIndex;
			this.Text = text;
			this.InfoType = infoType;
		}

		public enum CellInfoType
		{
			CIT_Text,
			CIT_Image,
			CIT_ConstImage
		}
	}
}
